<template>
  <div class="example">
    <jm-workflow-editor v-model="workflow" v-if="!loaded" />
  </div>
</template>

<script lang="ts">
import { defineComponent, nextTick, onMounted, ref } from 'vue';
import { IWorkflow } from '@/components/workflow/workflow-editor/model/data/common';
import yaml from 'yaml';

export default defineComponent({
  props: {
    id: {
      type: String,
    },
  },
  setup() {
    // workflow数据是否加载完成
    const loaded = ref<boolean>(false);
    const workflow = ref<IWorkflow>({
      name: '未命名项目',
      groupId: '1',
      global: {
        concurrent: false,
      },
      data: '',
    });
    onMounted(async () => {
      loaded.value = true;
      const dslText =
        'name: 建木前端CDN CD（图形化）\nglobal:\n  concurrent: false\npipeline:\n  node_0:\n    alias: git clone\n    type: _/git_clone:1.2.3\n    param:\n      remote_url: https://gitee.com/jianmu-dev/jianmu.git\n      ref: refs/tags/v2.4.0\n  node_1:\n    alias: nodejs构建\n    type: _/nodejs_build:1.2.1-14.16.1\n    param:\n      workspace: ${node_0.git_path}/ui\n      build_arg: --mode cdn\n      registry_url: https://registry.npm.taobao.org\n  node_2:\n    alias: 七牛云API\n    type: _/qiniu:1.0.0-file-upload\n    param:\n      qiniu_bucket: jianmu\n      qiniu_ak: ((qiniu.AccessKey))\n      qiniu_sk: ((qiniu.SecretKey))\n      qiniu_zone: z1\n      qiniu_upload_uri_prefix: ${node_1.package_version}/${node_0.git_tag}\n      qiniu_upload_dir: ${node_0.git_path}/ui/dist\n  node_3:\n    alias: ssh执行命令\n    type: _/ssh_cmd:1.0.1\n    param:\n      ssh_private_key: ((private_key.alixg))\n      ssh_ip: 47.243.164.48\n      ssh_port: "22"\n      ssh_user: root\n      ssh_cmd: mkdir -p /home/jianmu-ci-ui\n  node_4:\n    alias: scp替换文件\n    type: _/scp_resouce:1.1.0\n    param:\n      ssh_private_key: ((private_key.alixg))\n      ssh_ip: 47.243.164.48\n      ssh_port: "22"\n      ssh_user: root\n      remote_file: /home/jianmu-ci-ui/index.html\n      local_file: ${node_0.git_path}/ui/dist/index.html\n  node_5:\n    alias: 飞书通知-消息卡片\n    type: _/feishu_notice_interactive:1.0.4\n    param:\n      bot_webhook_url: ((feishu.webhook_url))\n      msg_title: 建木前端CDN更新完成\n      app_id: ((xxx.xxx))\n      app_secret: ((xxx.xxx))\n      msg_markdown: 版本：${node_0.git_tag}\\n\\n网址：[https://ci.jianmu.dev](https://ci.jianmu.dev)\n      msg_at_phone_list: "[]"\n  node_6:\n    alias: 发送邮件\n    type: _/email:1.0.0\n    param:\n      host: smtp.ym.163.com\n      port: 465\n      sender: notice@jianmu.dev\n      auth_code: ((email.notice_auth_code))\n      receivers: \'["dev@jianmu.dev"]\'\n      cc_receivers: "[]"\n      bcc_receivers: "[]"\n      type: html\n      subject: 建木前端CDN更新完成:${node_0.git_tag}\n      text: 建木前端CDN更新完成。版本：${node_0.git_tag}网址：https://ci.jianmu.dev\n\n\nraw-data: "{\\"cells\\":[{\\"shape\\":\\"edge\\",\\"attrs\\":{\\"line\\":{\\"stroke\\":\\"#667085\\",\\"targetMarker\\":{\\"name\\":\\"block\\",\\"width\\":12,\\"height\\":12},\\"stroke-width\\":1.5}},\\"id\\":\\"421257f7-2f0c-415f-b4c2-2e1312c69487\\",\\"router\\":{\\"name\\":\\"normal\\"},\\"connector\\":{\\"name\\":\\"rounded\\"},\\"zIndex\\":0,\\"source\\":{\\"cell\\":\\"a1e0de31-96c3-4d32-afb9-f43a1f3e131f\\",\\"port\\":\\"591f70aa-abb6-4431-8535-7eae938258d2\\"},\\"target\\":{\\"cell\\":\\"1d614760-fde2-423e-8a3d-cad2723ad4ea\\",\\"port\\":\\"28d7e2c9-4975-44a9-80b5-d60a709be5a8\\"}},{\\"shape\\":\\"edge\\",\\"attrs\\":{\\"line\\":{\\"stroke\\":\\"#667085\\",\\"targetMarker\\":{\\"name\\":\\"block\\",\\"width\\":12,\\"height\\":12},\\"stroke-width\\":1.5}},\\"id\\":\\"563fcca9-c259-47bd-a07b-1df5c6d32c45\\",\\"router\\":{\\"name\\":\\"normal\\"},\\"connector\\":{\\"name\\":\\"rounded\\"},\\"zIndex\\":0,\\"source\\":{\\"cell\\":\\"1d614760-fde2-423e-8a3d-cad2723ad4ea\\",\\"port\\":\\"b7e71531-0d8e-4994-a548-8015f3cd8c28\\"},\\"target\\":{\\"cell\\":\\"59d8f2c4-cfec-4947-b72e-b5dadb565d23\\",\\"port\\":\\"40a5aa0c-6796-480a-8b05-020a4fd3b35e\\"}},{\\"shape\\":\\"edge\\",\\"attrs\\":{\\"line\\":{\\"stroke\\":\\"#667085\\",\\"targetMarker\\":{\\"name\\":\\"block\\",\\"width\\":12,\\"height\\":12},\\"stroke-width\\":1.5}},\\"id\\":\\"dcda60d8-97dc-4a2b-aa66-de59dae7de4c\\",\\"router\\":{\\"name\\":\\"normal\\"},\\"connector\\":{\\"name\\":\\"rounded\\"},\\"zIndex\\":0,\\"source\\":{\\"cell\\":\\"e853ad46-9799-46c0-b052-a3472d18b39f\\",\\"port\\":\\"380702d1-dfa9-4c78-b9e6-a32c1cdfe218\\"},\\"target\\":{\\"cell\\":\\"c4afbd69-b325-4b1d-8376-f3ea908b781c\\",\\"port\\":\\"6d6aa83c-00a1-40f3-b107-805274923128\\"}},{\\"shape\\":\\"edge\\",\\"attrs\\":{\\"line\\":{\\"stroke\\":\\"#667085\\",\\"targetMarker\\":{\\"name\\":\\"block\\",\\"width\\":12,\\"height\\":12},\\"stroke-width\\":1.5}},\\"id\\":\\"3c23a392-daab-43d0-a6b0-211fb8a517cc\\",\\"router\\":{\\"name\\":\\"normal\\"},\\"connector\\":{\\"name\\":\\"rounded\\"},\\"zIndex\\":0,\\"source\\":{\\"cell\\":\\"c4afbd69-b325-4b1d-8376-f3ea908b781c\\",\\"port\\":\\"9a30413a-4ca8-451d-b497-8badaa4c0122\\"},\\"target\\":{\\"cell\\":\\"7e57d789-4e09-4178-82a8-deb900ed256e\\",\\"port\\":\\"0fd64533-2276-4ea4-857b-5a619940a32b\\"}},{\\"shape\\":\\"edge\\",\\"attrs\\":{\\"line\\":{\\"stroke\\":\\"#667085\\",\\"targetMarker\\":{\\"name\\":\\"block\\",\\"width\\":12,\\"height\\":12},\\"stroke-width\\":1.5}},\\"id\\":\\"7f08f6d6-15be-4ed5-b6e1-1eceff39ef9a\\",\\"router\\":{\\"name\\":\\"normal\\"},\\"connector\\":{\\"name\\":\\"rounded\\"},\\"zIndex\\":0,\\"source\\":{\\"cell\\":\\"59d8f2c4-cfec-4947-b72e-b5dadb565d23\\",\\"port\\":\\"7d8ee24d-019f-49ea-9838-9606966f3f47\\"},\\"target\\":{\\"cell\\":\\"e853ad46-9799-46c0-b052-a3472d18b39f\\",\\"port\\":\\"b7a4c3fe-40fa-445b-b901-6781975f9aef\\"},\\"vertices\\":[{\\"x\\":1350,\\"y\\":326},{\\"x\\":1350,\\"y\\":496}]},{\\"shape\\":\\"edge\\",\\"attrs\\":{\\"line\\":{\\"stroke\\":\\"#667085\\",\\"targetMarker\\":{\\"name\\":\\"block\\",\\"width\\":12,\\"height\\":12},\\"stroke-width\\":1.5}},\\"id\\":\\"e263063b-a51d-4135-9f5d-6fa103c3c376\\",\\"router\\":{\\"name\\":\\"normal\\"},\\"connector\\":{\\"name\\":\\"rounded\\"},\\"zIndex\\":0,\\"source\\":{\\"cell\\":\\"e8a03a15-ce2c-421e-9d5a-48ad08158621\\",\\"port\\":\\"492952b4-290a-4894-83f4-46c131a06107\\"},\\"target\\":{\\"cell\\":\\"a1e0de31-96c3-4d32-afb9-f43a1f3e131f\\",\\"port\\":\\"393a09dc-0c57-417a-9eb0-f1dc5a0def7e\\"}},{\\"position\\":{\\"x\\":756,\\"y\\":290},\\"size\\":{\\"width\\":72,\\"height\\":72},\\"view\\":\\"vue-shape-view\\",\\"shape\\":\\"vue-shape\\",\\"id\\":\\"e8a03a15-ce2c-421e-9d5a-48ad08158621\\",\\"component\\":\\"custom-vue-shape\\",\\"data\\":\\"{\\\\\\"ref\\\\\\":\\\\\\"git_clone\\\\\\",\\\\\\"name\\\\\\":\\\\\\"git clone\\\\\\",\\\\\\"type\\\\\\":\\\\\\"async-task\\\\\\",\\\\\\"icon\\\\\\":\\\\\\"https://jianmuhub.img.dghub.cn/node-definition/icon/FikR5g_gILRZjr-olpMqypjhfuj3\\\\\\",\\\\\\"docUrl\\\\\\":\\\\\\"https://jianmuhub.com/_/git_clone/\\\\\\",\\\\\\"ownerRef\\\\\\":\\\\\\"_\\\\\\",\\\\\\"version\\\\\\":\\\\\\"1.2.3\\\\\\",\\\\\\"versionDescription\\\\\\":\\\\\\"此版本可重试git clone节点\\\\\\",\\\\\\"inputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"username\\\\\\",\\\\\\"name\\\\\\":\\\\\\"用户名\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"git平台的账号\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"password\\\\\\",\\\\\\"name\\\\\\":\\\\\\"密码\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"git平台的密码\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"ssh_key\\\\\\",\\\\\\"name\\\\\\":\\\\\\"ssh私钥\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"平台中设置的ssh公钥对应的私钥(id_rsa)\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"remote_url\\\\\\",\\\\\\"name\\\\\\":\\\\\\"git地址\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"https://gitee.com/jianmu-dev/jianmu.git\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"配置远程的git源,即从哪个url上clone项目,使用账号密码的方式的url\\\\\\\\\\\\\\"https://gitee.com/jianmu-dev/jianmu.git\\\\\\\\\\\\\\"或者使用ssh方式的url为\\\\\\\\\\\\\\"git@gitee.com:jianmu-dev/jianmu.git\\\\\\\\\\\\\\"，若ssh端口为非默认的22时为\\\\\\\\\\\\\\"ssh://git@gitee.com:xxx/jianmu-dev/jianmu.git\\\\\\\\\\\\\\"，其中xxx为ssh端口\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"ref\\\\\\",\\\\\\"name\\\\\\":\\\\\\"标签、分支或pr/mr\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"refs/tags/v2.4.0\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"需要git的标签、分支或pr/mr，如果是branch则格式为：\\\\\\\\\\\\\\"refs/heads/master\\\\\\\\\\\\\\"； 如果是tag则格式为：\\\\\\\\\\\\\\"refs/tags/1.0.0\\\\\\\\\\\\\\"； 若选择pr/mr模式请参考各个平台的标准,如，gitee为pull/1/head，github为pull/1/head，gitlab为refs/merge-requests/1/head，coding为refs/merge/1/HEAD\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"commit_id\\\\\\",\\\\\\"name\\\\\\":\\\\\\"提交id\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"在ref为分支或pr/mr模式下，可以指定提交id，更精准的clone项目\\\\\\"}],\\\\\\"outputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"git_path\\\\\\",\\\\\\"name\\\\\\":\\\\\\"git clone目录\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"将克隆完成后的项目存放的地址以绝对路径的方式返回\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"git_branch\\\\\\",\\\\\\"name\\\\\\":\\\\\\"git分支\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"如果选择git分支，则会将返回分支名，如，master\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"git_tag\\\\\\",\\\\\\"name\\\\\\":\\\\\\"git tags\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"如果选择git标签，则将返回标签，如：1.0.0\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"commit_id\\\\\\",\\\\\\"name\\\\\\":\\\\\\"commit id\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"返回当前提交id\\\\\\"}],\\\\\\"failureMode\\\\\\":\\\\\\"suspend\\\\\\"}\\",\\"zIndex\\":1,\\"ports\\":{\\"groups\\":{\\"top\\":{\\"position\\":\\"top\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"right\\":{\\"position\\":\\"right\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"bottom\\":{\\"position\\":\\"bottom\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"left\\":{\\"position\\":\\"left\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}}},\\"items\\":[{\\"group\\":\\"top\\",\\"id\\":\\"2c5dfc60-38f3-45de-aaaf-523eb232babd\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"right\\",\\"id\\":\\"492952b4-290a-4894-83f4-46c131a06107\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"bottom\\",\\"id\\":\\"2065a702-0904-4ee0-a14d-7af34c37d72a\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"left\\",\\"id\\":\\"9f258d59-70a8-468c-afa7-5d46a6afaaaa\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}}]}},{\\"position\\":{\\"x\\":922,\\"y\\":290},\\"size\\":{\\"width\\":72,\\"height\\":72},\\"view\\":\\"vue-shape-view\\",\\"shape\\":\\"vue-shape\\",\\"id\\":\\"a1e0de31-96c3-4d32-afb9-f43a1f3e131f\\",\\"component\\":\\"custom-vue-shape\\",\\"data\\":\\"{\\\\\\"ref\\\\\\":\\\\\\"nodejs_build\\\\\\",\\\\\\"name\\\\\\":\\\\\\"nodejs构建\\\\\\",\\\\\\"type\\\\\\":\\\\\\"async-task\\\\\\",\\\\\\"icon\\\\\\":\\\\\\"https://jianmuhub.img.dghub.cn/node-definition/icon/FpON0edVLhS5j3Kgvs9i-rwljruu\\\\\\",\\\\\\"docUrl\\\\\\":\\\\\\"https://jianmuhub.com/_/nodejs_build/\\\\\\",\\\\\\"ownerRef\\\\\\":\\\\\\"_\\\\\\",\\\\\\"version\\\\\\":\\\\\\"1.2.1-14.16.1\\\\\\",\\\\\\"inputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"workspace\\\\\\",\\\\\\"name\\\\\\":\\\\\\"工作目录\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"${e8a03a15-ce2c-421e-9d5a-48ad08158621.git_path}/ui\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"build_arg\\\\\\",\\\\\\"name\\\\\\":\\\\\\"构建参数\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"--mode cdn\\\\\\",\\\\\\"required\\\\\\":false},{\\\\\\"ref\\\\\\":\\\\\\"registry_url\\\\\\",\\\\\\"name\\\\\\":\\\\\\"registry url\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"https://registry.npm.taobao.org\\\\\\",\\\\\\"required\\\\\\":false},{\\\\\\"ref\\\\\\":\\\\\\"disturl_url\\\\\\",\\\\\\"name\\\\\\":\\\\\\"disturl url\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false}],\\\\\\"outputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"package_name\\\\\\",\\\\\\"name\\\\\\":\\\\\\"名称\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"package_version\\\\\\",\\\\\\"name\\\\\\":\\\\\\"版本\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":true}],\\\\\\"failureMode\\\\\\":\\\\\\"suspend\\\\\\"}\\",\\"zIndex\\":2,\\"ports\\":{\\"groups\\":{\\"top\\":{\\"position\\":\\"top\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"right\\":{\\"position\\":\\"right\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"bottom\\":{\\"position\\":\\"bottom\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"left\\":{\\"position\\":\\"left\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}}},\\"items\\":[{\\"group\\":\\"top\\",\\"id\\":\\"3d42d9a5-4aa0-4e99-8780-72d2a5d62be4\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"right\\",\\"id\\":\\"591f70aa-abb6-4431-8535-7eae938258d2\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"bottom\\",\\"id\\":\\"2ff902c2-d0b4-4b36-9aab-0e534cf42305\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"left\\",\\"id\\":\\"393a09dc-0c57-417a-9eb0-f1dc5a0def7e\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}}]}},{\\"position\\":{\\"x\\":1086,\\"y\\":290},\\"size\\":{\\"width\\":72,\\"height\\":72},\\"view\\":\\"vue-shape-view\\",\\"shape\\":\\"vue-shape\\",\\"id\\":\\"1d614760-fde2-423e-8a3d-cad2723ad4ea\\",\\"component\\":\\"custom-vue-shape\\",\\"data\\":\\"{\\\\\\"ref\\\\\\":\\\\\\"qiniu\\\\\\",\\\\\\"name\\\\\\":\\\\\\"七牛云API\\\\\\",\\\\\\"type\\\\\\":\\\\\\"async-task\\\\\\",\\\\\\"icon\\\\\\":\\\\\\"https://jianmuhub.img.dghub.cn/node-definition/icon/FrN6T11DpnFpCVEc8EI3Pjra1n7V\\\\\\",\\\\\\"docUrl\\\\\\":\\\\\\"https://jianmuhub.com/_/qiniu/\\\\\\",\\\\\\"ownerRef\\\\\\":\\\\\\"_\\\\\\",\\\\\\"version\\\\\\":\\\\\\"1.0.0-file-upload\\\\\\",\\\\\\"inputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"qiniu_bucket\\\\\\",\\\\\\"name\\\\\\":\\\\\\"七牛bucket\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"jianmu\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"qiniu_ak\\\\\\",\\\\\\"name\\\\\\":\\\\\\"七牛accessKey\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"((qiniu.AccessKey))\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"qiniu_sk\\\\\\",\\\\\\"name\\\\\\":\\\\\\"七牛secretKey\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"((qiniu.SecretKey))\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"qiniu_zone\\\\\\",\\\\\\"name\\\\\\":\\\\\\"七牛zone\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"z1\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"不设置时，自动识别，华东：z0；华北：z1；华南：z2；北美：na0；东南亚：as0\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"qiniu_upload_uri_prefix\\\\\\",\\\\\\"name\\\\\\":\\\\\\"上传后的uri前缀\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"${a1e0de31-96c3-4d32-afb9-f43a1f3e131f.package_version}/${e8a03a15-ce2c-421e-9d5a-48ad08158621.git_tag}\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"如，jianmu-ci-ui/1.0.0\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"qiniu_upload_dir\\\\\\",\\\\\\"name\\\\\\":\\\\\\"要上传的目录\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"${e8a03a15-ce2c-421e-9d5a-48ad08158621.git_path}/ui/dist\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"如，/tmp/jianmu-ci-ui/dist\\\\\\"}],\\\\\\"outputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"qiniu_base_uri\\\\\\",\\\\\\"name\\\\\\":\\\\\\"上传后的根uri\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"/jianmu-ci-ui/1.0.0\\\\\\"}],\\\\\\"failureMode\\\\\\":\\\\\\"suspend\\\\\\"}\\",\\"zIndex\\":3,\\"ports\\":{\\"groups\\":{\\"top\\":{\\"position\\":\\"top\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"right\\":{\\"position\\":\\"right\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"bottom\\":{\\"position\\":\\"bottom\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"left\\":{\\"position\\":\\"left\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}}},\\"items\\":[{\\"group\\":\\"top\\",\\"id\\":\\"52096152-944d-4d25-a92a-6c4fd3dedbb9\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"right\\",\\"id\\":\\"b7e71531-0d8e-4994-a548-8015f3cd8c28\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"bottom\\",\\"id\\":\\"c97b412c-baa9-45f4-b77a-38fea23e99b6\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"left\\",\\"id\\":\\"28d7e2c9-4975-44a9-80b5-d60a709be5a8\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}}]}},{\\"position\\":{\\"x\\":1240,\\"y\\":290},\\"size\\":{\\"width\\":72,\\"height\\":72},\\"view\\":\\"vue-shape-view\\",\\"shape\\":\\"vue-shape\\",\\"id\\":\\"59d8f2c4-cfec-4947-b72e-b5dadb565d23\\",\\"component\\":\\"custom-vue-shape\\",\\"data\\":\\"{\\\\\\"ref\\\\\\":\\\\\\"ssh_cmd\\\\\\",\\\\\\"name\\\\\\":\\\\\\"ssh执行命令\\\\\\",\\\\\\"type\\\\\\":\\\\\\"async-task\\\\\\",\\\\\\"icon\\\\\\":\\\\\\"https://jianmuhub.img.dghub.cn/node-definition/icon/FuR2Q_RwpR-J1vBT5vQ9nhl3cRGG\\\\\\",\\\\\\"docUrl\\\\\\":\\\\\\"https://jianmuhub.com/_/ssh_cmd/\\\\\\",\\\\\\"ownerRef\\\\\\":\\\\\\"_\\\\\\",\\\\\\"version\\\\\\":\\\\\\"1.0.1\\\\\\",\\\\\\"inputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"ssh_private_key\\\\\\",\\\\\\"name\\\\\\":\\\\\\"ssh私钥\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"((private_key.alixg))\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"ssh_ip\\\\\\",\\\\\\"name\\\\\\":\\\\\\"远程主机IP\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"47.243.164.48\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"ssh_port\\\\\\",\\\\\\"name\\\\\\":\\\\\\"ssh端口\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"22\\\\\\",\\\\\\"required\\\\\\":false},{\\\\\\"ref\\\\\\":\\\\\\"ssh_user\\\\\\",\\\\\\"name\\\\\\":\\\\\\"ssh连接用户\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"root\\\\\\",\\\\\\"required\\\\\\":false},{\\\\\\"ref\\\\\\":\\\\\\"ssh_cmd\\\\\\",\\\\\\"name\\\\\\":\\\\\\"执行命令\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"mkdir -p /home/jianmu-ci-ui\\\\\\",\\\\\\"required\\\\\\":true}],\\\\\\"outputs\\\\\\":[],\\\\\\"failureMode\\\\\\":\\\\\\"suspend\\\\\\"}\\",\\"zIndex\\":4,\\"ports\\":{\\"groups\\":{\\"top\\":{\\"position\\":\\"top\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"right\\":{\\"position\\":\\"right\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"bottom\\":{\\"position\\":\\"bottom\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"left\\":{\\"position\\":\\"left\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}}},\\"items\\":[{\\"group\\":\\"top\\",\\"id\\":\\"8480da6b-9daf-42aa-a40b-3fd22a099b91\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"right\\",\\"id\\":\\"7d8ee24d-019f-49ea-9838-9606966f3f47\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"bottom\\",\\"id\\":\\"79ac4180-478b-4b98-8341-918d18a7b152\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"left\\",\\"id\\":\\"40a5aa0c-6796-480a-8b05-020a4fd3b35e\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}}]}},{\\"position\\":{\\"x\\":1168,\\"y\\":460},\\"size\\":{\\"width\\":72,\\"height\\":72},\\"view\\":\\"vue-shape-view\\",\\"shape\\":\\"vue-shape\\",\\"id\\":\\"e853ad46-9799-46c0-b052-a3472d18b39f\\",\\"component\\":\\"custom-vue-shape\\",\\"data\\":\\"{\\\\\\"ref\\\\\\":\\\\\\"scp_resouce\\\\\\",\\\\\\"name\\\\\\":\\\\\\"scp替换文件\\\\\\",\\\\\\"type\\\\\\":\\\\\\"async-task\\\\\\",\\\\\\"icon\\\\\\":\\\\\\"https://jianmuhub.img.dghub.cn/node-definition/icon/FuR2Q_RwpR-J1vBT5vQ9nhl3cRGG\\\\\\",\\\\\\"docUrl\\\\\\":\\\\\\"https://jianmuhub.com/_/scp_resouce/\\\\\\",\\\\\\"ownerRef\\\\\\":\\\\\\"_\\\\\\",\\\\\\"version\\\\\\":\\\\\\"1.1.0\\\\\\",\\\\\\"inputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"ssh_private_key\\\\\\",\\\\\\"name\\\\\\":\\\\\\"ssh私钥\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"((private_key.alixg))\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"ssh_ip\\\\\\",\\\\\\"name\\\\\\":\\\\\\"远程主机IP\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"47.243.164.48\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"ssh_port\\\\\\",\\\\\\"name\\\\\\":\\\\\\"ssh端口\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"22\\\\\\",\\\\\\"required\\\\\\":false},{\\\\\\"ref\\\\\\":\\\\\\"ssh_user\\\\\\",\\\\\\"name\\\\\\":\\\\\\"ssh连接用户\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"root\\\\\\",\\\\\\"required\\\\\\":false},{\\\\\\"ref\\\\\\":\\\\\\"remote_file\\\\\\",\\\\\\"name\\\\\\":\\\\\\"远程文件/目录路径\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"/home/jianmu-ci-ui/index.html\\\\\\",\\\\\\"required\\\\\\":true},{\\\\\\"ref\\\\\\":\\\\\\"local_file\\\\\\",\\\\\\"name\\\\\\":\\\\\\"本地文件/目录路径\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"${e8a03a15-ce2c-421e-9d5a-48ad08158621.git_path}/ui/dist/index.html\\\\\\",\\\\\\"required\\\\\\":true}],\\\\\\"outputs\\\\\\":[],\\\\\\"failureMode\\\\\\":\\\\\\"suspend\\\\\\"}\\",\\"zIndex\\":5,\\"ports\\":{\\"groups\\":{\\"top\\":{\\"position\\":\\"top\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"right\\":{\\"position\\":\\"right\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"bottom\\":{\\"position\\":\\"bottom\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"left\\":{\\"position\\":\\"left\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}}},\\"items\\":[{\\"group\\":\\"top\\",\\"id\\":\\"cae56390-8a84-4d70-bace-8aea6f012cbc\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"right\\",\\"id\\":\\"b7a4c3fe-40fa-445b-b901-6781975f9aef\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"bottom\\",\\"id\\":\\"99897a6e-97d1-4d1b-9320-a4203ef954b5\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"left\\",\\"id\\":\\"380702d1-dfa9-4c78-b9e6-a32c1cdfe218\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}}]}},{\\"position\\":{\\"x\\":1014,\\"y\\":460},\\"size\\":{\\"width\\":72,\\"height\\":72},\\"view\\":\\"vue-shape-view\\",\\"shape\\":\\"vue-shape\\",\\"id\\":\\"c4afbd69-b325-4b1d-8376-f3ea908b781c\\",\\"component\\":\\"custom-vue-shape\\",\\"data\\":\\"{\\\\\\"ref\\\\\\":\\\\\\"feishu_notice_interactive\\\\\\",\\\\\\"name\\\\\\":\\\\\\"飞书通知-消息卡片\\\\\\",\\\\\\"type\\\\\\":\\\\\\"async-task\\\\\\",\\\\\\"icon\\\\\\":\\\\\\"https://jianmuhub.img.dghub.cn/node-definition/icon/FhaFsSZDMEklnTnzLc1qcj1IWXH5\\\\\\",\\\\\\"docUrl\\\\\\":\\\\\\"https://jianmuhub.com/_/feishu_notice_interactive/\\\\\\",\\\\\\"ownerRef\\\\\\":\\\\\\"_\\\\\\",\\\\\\"version\\\\\\":\\\\\\"1.0.4\\\\\\",\\\\\\"versionDescription\\\\\\":\\\\\\"该版本将参数msg_text修改为了非必填参数\\\\\\",\\\\\\"inputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"bot_webhook_url\\\\\\",\\\\\\"name\\\\\\":\\\\\\"机器人webhook\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"((feishu.webhook_url))\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"机器人webhook\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"msg_title\\\\\\",\\\\\\"name\\\\\\":\\\\\\"消息标题\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"建木前端CDN更新完成\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"消息标题\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"app_id\\\\\\",\\\\\\"name\\\\\\":\\\\\\"App ID\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"((xxx.xxx))\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"App ID\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"app_secret\\\\\\",\\\\\\"name\\\\\\":\\\\\\"App Secret\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"((xxx.xxx))\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"App Secret\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"image_url\\\\\\",\\\\\\"name\\\\\\":\\\\\\"图片url\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"图片url\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"msg_text\\\\\\",\\\\\\"name\\\\\\":\\\\\\"消息文本\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"消息文本\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"msg_markdown\\\\\\",\\\\\\"name\\\\\\":\\\\\\"markdown文本\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"版本：${e8a03a15-ce2c-421e-9d5a-48ad08158621.git_tag}\\\\\\\\\\\\\\\\n\\\\\\\\\\\\\\\\n网址：[https://ci.jianmu.dev](https://ci.jianmu.dev)\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"markdown文本\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"msg_at_phone_list\\\\\\",\\\\\\"name\\\\\\":\\\\\\"提醒列表，phone，若填写，将会@指定用户，@all表示提醒所有人\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"[]\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"提醒列表，phone，若填写，将会@指定用户，@all表示提醒所有人\\\\\\"}],\\\\\\"outputs\\\\\\":[],\\\\\\"failureMode\\\\\\":\\\\\\"suspend\\\\\\"}\\",\\"zIndex\\":6,\\"ports\\":{\\"groups\\":{\\"top\\":{\\"position\\":\\"top\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"right\\":{\\"position\\":\\"right\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"bottom\\":{\\"position\\":\\"bottom\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"left\\":{\\"position\\":\\"left\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}}},\\"items\\":[{\\"group\\":\\"top\\",\\"id\\":\\"04c93fcd-c683-4e8d-81bc-9e9f269776b2\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"right\\",\\"id\\":\\"6d6aa83c-00a1-40f3-b107-805274923128\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"bottom\\",\\"id\\":\\"0a7a1746-f75c-4842-8ac0-c0db5d7e2e15\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"left\\",\\"id\\":\\"9a30413a-4ca8-451d-b497-8badaa4c0122\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}}]}},{\\"position\\":{\\"x\\":850,\\"y\\":460},\\"size\\":{\\"width\\":72,\\"height\\":72},\\"view\\":\\"vue-shape-view\\",\\"shape\\":\\"vue-shape\\",\\"id\\":\\"7e57d789-4e09-4178-82a8-deb900ed256e\\",\\"component\\":\\"custom-vue-shape\\",\\"data\\":\\"{\\\\\\"ref\\\\\\":\\\\\\"email\\\\\\",\\\\\\"name\\\\\\":\\\\\\"发送邮件\\\\\\",\\\\\\"type\\\\\\":\\\\\\"async-task\\\\\\",\\\\\\"icon\\\\\\":\\\\\\"https://jianmuhub.img.dghub.cn/node-definition/icon/FoYp6c62VmRSpCjk1Q4at4NHAPGd\\\\\\",\\\\\\"docUrl\\\\\\":\\\\\\"https://jianmuhub.com/_/email/\\\\\\",\\\\\\"ownerRef\\\\\\":\\\\\\"_\\\\\\",\\\\\\"version\\\\\\":\\\\\\"1.0.0\\\\\\",\\\\\\"versionDescription\\\\\\":\\\\\\"使用SMTP协议或SMTP_SSL协议发送邮件\\\\\\",\\\\\\"inputs\\\\\\":[{\\\\\\"ref\\\\\\":\\\\\\"host\\\\\\",\\\\\\"name\\\\\\":\\\\\\"host\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"smtp.ym.163.com\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"SMTP服务器主机\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"port\\\\\\",\\\\\\"name\\\\\\":\\\\\\"port\\\\\\",\\\\\\"type\\\\\\":\\\\\\"NUMBER\\\\\\",\\\\\\"value\\\\\\":\\\\\\"465\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"SMTP服务器主机端口号，默认为465，使用SMTP_SSL协议；非465时使用SMTP协议\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"sender\\\\\\",\\\\\\"name\\\\\\":\\\\\\"发件人邮箱\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"notice@jianmu.dev\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"发件人邮箱，如：xxx@qq.com\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"auth_code\\\\\\",\\\\\\"name\\\\\\":\\\\\\"授权码\\\\\\",\\\\\\"type\\\\\\":\\\\\\"SECRET\\\\\\",\\\\\\"value\\\\\\":\\\\\\"((email.notice_auth_code))\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"发件人邮箱授权码，一般在邮箱设置中获取\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"receivers\\\\\\",\\\\\\"name\\\\\\":\\\\\\"收件人邮箱\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"[\\\\\\\\\\\\\\"dev@jianmu.dev\\\\\\\\\\\\\\"]\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"收件人邮箱，如：\'[\\\\\\\\\\\\\\"aaa@qq.com\\\\\\\\\\\\\\", \\\\\\\\\\\\\\"bbb@163.com\\\\\\\\\\\\\\"]\'\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"cc_receivers\\\\\\",\\\\\\"name\\\\\\":\\\\\\"抄送人邮箱\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"[]\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"抄送人邮箱，同时将这封邮件发送给其他人，如：\'[\\\\\\\\\\\\\\"aaa@qq.com\\\\\\\\\\\\\\", \\\\\\\\\\\\\\"bbb@163.com\\\\\\\\\\\\\\"]\'\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"bcc_receivers\\\\\\",\\\\\\"name\\\\\\":\\\\\\"密送人邮箱\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"[]\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"密送人邮箱，同时将这封邮件发送给其他人，但收件人和抄件人不会看到密送人，如：\'[\\\\\\\\\\\\\\"aaa@qq.com\\\\\\\\\\\\\\", \\\\\\\\\\\\\\"bbb@163.com\\\\\\\\\\\\\\"]\'\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"separate_delivery\\\\\\",\\\\\\"name\\\\\\":\\\\\\"分别发送\\\\\\",\\\\\\"type\\\\\\":\\\\\\"BOOL\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"默认为false，表示群发给多个人；true表示对多个人一对一的发送\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"type\\\\\\",\\\\\\"name\\\\\\":\\\\\\"邮件内容类型\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"html\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"邮件内容类型：plain表示普通文本，html表示html标签。默认为plain\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"subject\\\\\\",\\\\\\"name\\\\\\":\\\\\\"邮件主题\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"建木前端CDN更新完成:${e8a03a15-ce2c-421e-9d5a-48ad08158621.git_tag}\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"邮件主题\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"text\\\\\\",\\\\\\"name\\\\\\":\\\\\\"邮件内容\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"建木前端CDN更新完成。版本：${e8a03a15-ce2c-421e-9d5a-48ad08158621.git_tag}网址：https://ci.jianmu.dev\\\\\\",\\\\\\"required\\\\\\":true,\\\\\\"description\\\\\\":\\\\\\"邮件内容，可以为普通文本或html标签，要和邮件内容类型保持一致\\\\\\"},{\\\\\\"ref\\\\\\":\\\\\\"attach_path\\\\\\",\\\\\\"name\\\\\\":\\\\\\"附件路径\\\\\\",\\\\\\"type\\\\\\":\\\\\\"STRING\\\\\\",\\\\\\"value\\\\\\":\\\\\\"\\\\\\",\\\\\\"required\\\\\\":false,\\\\\\"description\\\\\\":\\\\\\"附件路径，当路径为文件时，直接发送；当路径为目录时，会压缩为zip文件后再发送\\\\\\"}],\\\\\\"outputs\\\\\\":[],\\\\\\"failureMode\\\\\\":\\\\\\"suspend\\\\\\"}\\",\\"zIndex\\":7,\\"ports\\":{\\"groups\\":{\\"top\\":{\\"position\\":\\"top\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"right\\":{\\"position\\":\\"right\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"bottom\\":{\\"position\\":\\"bottom\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}},\\"left\\":{\\"position\\":\\"left\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false,\\"stroke\\":\\"#A7B0BB\\",\\"stroke-width\\":1,\\"fill\\":\\"#FFFFFF\\"}}}},\\"items\\":[{\\"group\\":\\"top\\",\\"id\\":\\"426c02e0-823b-404e-a67a-14c4263b49da\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"right\\",\\"id\\":\\"0fd64533-2276-4ea4-857b-5a619940a32b\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"bottom\\",\\"id\\":\\"c66eec34-445e-43db-a68a-ce7b61bec32a\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}},{\\"group\\":\\"left\\",\\"id\\":\\"8327d6ae-bffc-4a9e-aeb1-77361bd91560\\",\\"attrs\\":{\\"circle\\":{\\"r\\":0,\\"magnet\\":false}}}]}}]}"';
      const rawData = yaml.parse(dslText)['raw-data'];
      const { name, global } = yaml.parse(dslText);
      workflow.value = {
        name,
        groupId: '1',
        global: {
          concurrent: global ? global.concurrent : false,
        },
        data: rawData,
      };
      await nextTick();
      loaded.value = false;
    });
    return {
      loaded,
      workflow,
    };
  },
});
</script>

<style scoped lang="less">
.example {
  height: 100vh;
  position: relative;

  ::v-deep(.jm-workflow-editor) {
    .jm-workflow-editor-toolbar {
      .right {
        .operations {
          cursor: not-allowed;
        }

        .el-button {
          pointer-events: none;

          &.save-return {
            &:hover {
              background-color: #f5f5f5;
              color: #082340;
            }
          }

          &.el-button--primary {
            background-color: #096dd9;
            border-color: #096dd9;
          }
        }
      }

      .jm-icon-button-left {
        cursor: not-allowed;
        color: inherit;

        &:hover {
          background-color: inherit;
          color: inherit;
        }
      }
    }
  }
}
</style>
